﻿#include"finddesktop.h"
#include <QDebug>

HWND WorkerW=NULL;

HWND findDesktopIconWnd()
{
    return FindWindowW(L"Qt5QWindowIcon", L"demoB");
}
void SendMessageToDesktop()
{
     PDWORD_PTR result = NULL;
     //发送消息，召唤WorkerW
     //参考：https://www.codeproject.com/articles/856020/draw-behind-desktop-icons-in-windows
     SendMessageTimeout(FindWindowW(L"Qt5QWindowIcon", L"demoB"), 0x52c, 0, 0, SMTO_NORMAL, 1000, result);
}

HWND GetWorkerW()
{
    findDesktopIconWnd();
    return WorkerW;//得到WorkerW
}
